import 'package:factoryside/bean/bill_sec_entity.dart';

billSecEntityFromJson(BillSecEntity data, Map<String, dynamic> json) {
	if (json['FinancialID'] != null) {
		data.financialID = json['FinancialID'] is String
				? int.tryParse(json['FinancialID'])
				: json['FinancialID'].toInt();
	}
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['OrderNumber'] != null) {
		data.orderNumber = json['OrderNumber'].toString();
	}
	if (json['SerialNumber'] != null) {
		data.serialNumber = json['SerialNumber'].toString();
	}
	if (json['CreateTime'] != null) {
		data.createTime = json['CreateTime'].toString();
	}
	if (json['PayMoney'] != null) {
		data.payMoney = json['PayMoney'] is String
				? double.tryParse(json['PayMoney'])
				: json['PayMoney'].toDouble();
	}
	if (json['StateName'] != null) {
		data.stateName = json['StateName'].toString();
	}
	if (json['State'] != null) {
		data.state = json['State'].toString();
	}
	if (json['OutOrIn'] != null) {
		data.outOrIn = json['OutOrIn'];
	}
	return data;
}

Map<String, dynamic> billSecEntityToJson(BillSecEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['FinancialID'] = entity.financialID;
	data['OrderID'] = entity.orderID;
	data['OrderNumber'] = entity.orderNumber;
	data['SerialNumber'] = entity.serialNumber;
	data['CreateTime'] = entity.createTime;
	data['PayMoney'] = entity.payMoney;
	data['StateName'] = entity.stateName;
	data['State'] = entity.state;
	data['OutOrIn'] = entity.outOrIn;
	return data;
}